package com.mgface.framework.springcloud.feign;

import com.mgface.framework.Configuration2;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Configuration2.class因为禁用了hystrixFeign,所以fallback不会生效，是一种细粒度的控制。
 */
//当配置了URL,那么name就是一个标识符号，标识有个sys的FeignClient
@FeignClient(name = "sys", url = "http://localhost:8761", configuration = Configuration2.class,fallback = FeignClient2Fallback.class)
public interface FeignClient2 {
  @RequestMapping(value = "/eureka/apps/{serviceName}")
  public String findServiceInfoFromEurekaByServiceName(@PathVariable("serviceName") String serviceName);
}
